Skip to content

feat(test): adopt Scriptorium (Nib + Quill) as test framework - #144

Merged
dbrattli merged 4 commits into
mainfrom
feat/scriptorium-test-framework
Aug 23, 2026
Merged

feat(test): adopt Scriptorium (Nib + Quill) as test framework#144
dbrattli merged 4 commits into
mainfrom
feat/scriptorium-test-framework

Conversation

@dbrattli

Copy link
Copy Markdown
Collaborator

What

Migrate Fable.Beam's test suite onto Scriptorium (Nib assertions + Quill runner), following ../Fable.Actor / ../Fable.Reactive, replacing the old [<Fact>] + Erlang test_runner.erl discovery model.

This is a draft that establishes the plumbing and converts a representative subset; remaining files migrate in follow-ups (noted in-commit and in AGENTS.md / CLAUDE.md).

Changes

  • Main.fs runs Quill's runTests instead of an Erlang test runner (main:main/1)
  • Convert a representative subset — Timer, Maps, GenServer (29 tests) — to per-module tests lists with direct BEAM bodies (no #if FABLE_COMPILER)
  • Consume Scriptorium from NuGet via explicit PackageReferences (Quill 0.5.1, Nib 0.4.1), pinned like ../Fable.Actor; pin Fable.Core 5.2.0 so Fable transpiles Scriptorium's shipped source against a known runtime
  • Drop the now-inert test/paket.references; remove test_runner.erl from the just test pipeline (now runs main:main([]))
  • Update CLAUDE.md / AGENTS.md

Verified

  • just test → 29 passed on BEAM, exit 0; Quill halts non-zero on failure
  • dotnet fantomas test --check clean

Notes / follow-up

  • Remaining Test*.fs files still use [<Fact>] and aren't compiled yet — re-add each to Fable.Beam.Test.fsproj (before Main.fs) as it migrates
  • Retired Erlang test_runner.erl left on disk, unreferenced by the pipeline
  • just test-dotnet still fails at runtime because Fable.Beam bindings are BEAM-only (pre-existing; its value is the compile step)

Replace the [<Fact>] + Erlang test_runner.erl discovery model with the
Scriptorium test framework: Nib assertions and the Quill runner, matching
../Fable.Actor and ../Fable.Reactive.

- Main.fs now runs Quill's runTests instead of an Erlang test runner
- Convert a representative subset (Timer, Maps, GenServer = 29 tests) to
  per-module `tests` lists with direct BEAM bodies (no #if FABLE_COMPILER)
- Consume Scriptorium from NuGet via explicit PackageReferences (Quill 0.5.1,
  Nib 0.4.1), pinned like ../Fable.Actor; pin Fable.Core 5.2.0 so Fable can
  transpile Scriptorium's shipped source against a known runtime
- Drop the now-inert test/paket.references and remove test_runner.erl from the
  justfile pipeline (just test runs main:main/1)
- Update CLAUDE.md / AGENTS.md docs

Remaining Test*.fs files still use [<Fact>] and are not compiled yet; re-add
each to Fable.Beam.Test.fsproj (before Main.fs) as it migrates.
Convert TestPort, TestSupervisor, TestLogger, TestFile, TestEts and TestJsx from
[<Fact>] + Erlang test_runner discovery to Scriptorium (Nib assertions + Quill runner).

This completes the suite migration: all 26 test files now expose a 'tests' value
and run through Quill. Adds a ProjectReference to Fable.Beam.Jsx so TestJsx can
resolve its bindings. 411 tests pass on BEAM.
@dbrattli
dbrattli marked this pull request as ready for review August 23, 2026 09:15
@dbrattli
dbrattli merged commit 2f91f9f into main Aug 23, 2026
2 checks passed
@dbrattli
dbrattli deleted the feat/scriptorium-test-framework branch August 23, 2026 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant